package com.jintoufs.service.message.impl;

import com.jintoufs.dao.QueryFilters;
import com.jintoufs.dao.message.MessageDAO;
import com.jintoufs.dao.user.UserDAO;
import com.jintoufs.domain.message.Message;
import com.jintoufs.service.message.MessageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 *
 */
@Service
public class MessageServiceImpl implements MessageService {
    @Resource
    private MessageDAO messageDAO;

    @Resource
    private UserDAO userDAO;

    @Override
    public List<Map<String,Object>> getByFilter(QueryFilters filters) {
        return messageDAO.getByFilter(filters);
    }

    @Override
    public Integer update(Message entity) {
        return messageDAO.update(entity);
    }

    @Override
    public Message insert(Message entity) {
        messageDAO.insert(entity);
        return entity;
    }

    @Override
    public void delete(Integer id) {
        messageDAO.delete(id);
    }

    @Override
    public List<Message> getByParams(Map<String, Object> params1) {
        return messageDAO.getByParams(params1);
    }

    @Override
    public Map<String, Object> queryById(Integer id) {
        return messageDAO.queryById(id);
    }


}
